/**
* @Title: ClientObjectInitializer.java
* @Package com.an.objecttran
* @Description: TODO(用一句话描述该文件做什么)
* @author antch,861710865@qq.com
* @date 2017年7月26日 下午3:47:51
* @version V1.0
*/


package com.an.objecttran;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.serialization.ObjectEncoder;
import io.netty.handler.codec.string.StringDecoder;

/**
* @ClassName: ClientObjectInitializer
* @Description: TODO(这里用一句话描述这个类的作用)
* @author antch,861710865@qq.com
* @date 2017年7月26日 下午3:47:51
*
*/

public class ClientObjectInitializer extends ChannelInitializer<SocketChannel> {

	@Override
	protected void initChannel(SocketChannel ch) throws Exception {
		// TODO Auto-generated method stub

		ChannelPipeline pipeline = ch.pipeline();
		pipeline.addLast("strde",new StringDecoder());
		pipeline.addLast("obje",new ObjectEncoder());

		pipeline.addLast("handler",new ClientObjectHandler());
//		pipeline.addLast("outbound",new ClientOutBpundehandler());

	}

}
